/**
 * --------------------------------------------------------------------------
 * Hi.js (v1.0.0): dialog
 * require jquery
 * --------------------------------------------------------------------------
 */
;
(function($, window, document, undefined) {
    'use strict';

    function init(target) {}

    function update(target) {}

    function destroy(target) {}

    $.fn.dialog = function(options, param) {
        if (typeof options == 'string') {
            return $.fn.dialog.methods[options](this, param);
        }
        options = options || {};
        return this.each(function() {
            var state = $.data(this, 'dialog');
            if (state) {
                $.extend(state.options, options);
            } else {
                $.data(this, 'dialog', {
                    options: $.extend({}, $.fn.dialog.defaults, $.fn.dialog.parseOptions(this), options)
                })
                init(this);
            }
            update(this);
        });
    };

    $.fn.dialog.VERSION = '1.0.0';

    $.fn.dialog.methods = {
        options: function(jq) {
            return $.data(jq[0], 'dialog').options;
        },
        update: function(jq, param) {
            return jq.each(function() {
                update(this, param);
            });
        },
        destroy: function(jq, param) {
            return jq.each(function() {
                destroy(this, param);
            });
        }
    };
    $.fn.dialog.parseOptions = function(target) {
        var $element = $(target);
        var options = $.extend({}, $.parser.parseOptions($element, ['position'], {
            trackMouse: 'boolean'
        }));
        return options;
    }

    $.fn.dialog.defaults = {
    	title: '',
    	collapsible: false,
    	minimizable: false,
    	minimizable: false,
    	maximizable: false,
    	toolbar: null,
    	buttons: null
    };

})(jQuery, window, document);